// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** getRequirement id获取需求详情 GET /api/requirement */
export async function getRequirementUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getRequirementUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseRequirementVo_>('/api/requirement', {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** addRequirement 新建需求 POST /api/requirement/add */
export async function addRequirementUsingPost(
  body: API.AddRequirementRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/requirement/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** deleteRequirement 删除需求 DELETE /api/requirement/delete */
export async function deleteRequirementUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteRequirementUsingDELETEParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/requirement/delete', {
    method: 'DELETE',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** pageTaskDynamics 分页获取任务动态 POST /api/requirement/dynamics/page */
export async function pageReqDynamicUsingPost(
  body: API.PageReqDynamicRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageReqDynamicVo_>('/api/requirement/dynamics/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** getRequirementByTaskId 根据任务id获取需求信息 GET /api/requirement/getRequirementByTaskId */
export async function getRequirementByTaskIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getRequirementByTaskIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseRequirementVo_>('/api/requirement/getRequirementByTaskId', {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** listRequirementByIterationId 根据迭代id获取需求列表 GET /api/requirement/listRequirementByIterationId */
export async function listRequirementByIterationIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listRequirementByIterationIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListRequirementVo_>(
    '/api/requirement/listRequirementByIterationId',
    {
      method: 'GET',
      params: {
        ...params
      },
      ...(options || {})
    }
  )
}

/** updateRequirement 更新需求 PUT /api/requirement/update */
export async function updateRequirementUsingPut(
  body: API.UpdateRequirementRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/requirement/update', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}
